#include "Frustum.h"
#include <glm/gtc/matrix_transform.hpp>

namespace SEngine
{

    void PerspectiveFrustum::Transform(glm::mat4 matrix)
    {
        m_pos = glm::translate(glm::mat4{1.0f}, glm::vec3{matrix * glm::vec4{0.0f, 0.0f, 0.0f, 1.0f}}) * glm::vec4{m_pos, 1.0f};
    }

    void OrthoFrustum::Transform(glm::mat4 matrix)
    {
        m_pos = glm::translate(glm::mat4{1.0f}, glm::vec3{matrix * glm::vec4{0.0f, 0.0f, 0.0f, 1.0f}}) * glm::vec4{m_pos, 1.0f};
    }

} // namespace SEngine
